use "Table9data.dta" 
ssc install outreg2
******************Ogalla Aquifer********************


xtreg log_grass_prop log_budgetmwheat log_budgetmcotton log_budgetmcorn c.log_budgetmwheat#i.ogalla_id c.log_budgetmcotton#i.ogalla_id  c.log_budgetmcorn#i.ogalla_id i.state_fips#c.year, fe

outreg2 using DID_ogalla.tex,replace ctitle(Farmsize) label title("Table 2: HTE Impact of Farmland Conservation on Total Grassland by Ogalla Aquifer"\label{tab1})

xtreg log_grass_prop log_budgetmwheat log_budgetmcotton log_budgetmcorn c.log_budgetmwheat#i.ogalla_id c.log_budgetmcotton#i.ogalla_id  c.log_budgetmcorn#i.ogalla_id i.state_fips#c.year if year<1950, fe 

outreg2 using DID_ogalla.tex,append ctitle($<$ 1950) label addtext(County FE, Yes, State*Year Trend, Yes ) title("Table 2: HTE Impact of Farmland Conservation on Total Grassland by Ogalla Aquifer"\label{tab1})


xtreg log_grass_prop log_budgetmwheat log_budgetmcotton log_budgetmcorn c.log_budgetmwheat#i.ogalla_id c.log_budgetmcotton#i.ogalla_id  c.log_budgetmcorn#i.ogalla_id i.state_fips#c.year if year<1960, fe 
outreg2 using DID_ogalla.tex,append ctitle($<$ 1960) label addtext(County FE, Yes, State*Year Trend, Yes ) title("Table 2: HTE Impact of Farmland Conservation on Total Grassland by Ogalla Aquifer"\label{tab1})


xtreg log_grass_prop log_budgetmwheat log_budgetmcotton log_budgetmcorn c.log_budgetmwheat#i.ogalla_id c.log_budgetmcotton#i.ogalla_id  c.log_budgetmcorn#i.ogalla_id i.state_fips#c.year if year<1970, fe 
outreg2 using DID_ogalla.tex,append ctitle($<$ 1970) label addtext(County FE, Yes, State*Year Trend, Yes ) title("Table 2: HTE Impact of Farmland Conservation on Total Grassland by Ogalla Aquifer"\label{tab1})
 


xtreg log_grass_prop log_budgetmwheat log_budgetmcotton log_budgetmcorn c.log_budgetmwheat#i.ogalla_id c.log_budgetmcotton#i.ogalla_id  c.log_budgetmcorn#i.ogalla_id i.state_fips#c.year if year<1980, fe 
outreg2 using DID_ogalla.tex,append ctitle($<$ 1980) label addtext(County FE, Yes, State*Year Trend, Yes ) title("Table 2: HTE Impact of Farmland Conservation on Total Grassland by Ogalla Aquifer"\label{tab1})